package com.wsoft.hr.pm.manager;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wsoft.hr.pm.entity.HrPmMemberTemplateScoreEntity;
import com.wsoft.hr.pm.mapper.HrPmMemberTemplateScoreMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Admin
 * @date 2025/3/15 13:41
 * @description:
 */

@Slf4j
@Service
public class HrPmMemberTemplateScoreManager extends ServiceImpl<HrPmMemberTemplateScoreMapper, HrPmMemberTemplateScoreEntity> {

    public List<HrPmMemberTemplateScoreEntity> listMemberTemplateScore(Long memberTemplateId,Long memberId) {
    QueryWrapper<HrPmMemberTemplateScoreEntity> query = new QueryWrapper<>();
        query.lambda().eq(null != memberTemplateId,HrPmMemberTemplateScoreEntity::getMemberTemplateId, memberTemplateId)
                .eq(null != memberId, HrPmMemberTemplateScoreEntity::getScoreMemberId, memberId);
    return list(query);
    }
}
